<template>
  <div class="viewContain">
    <!-- 列表数据ok -->
    <el-table
      ref="table"
      v-loading="loading"
      fit
      stripe
      :data="tableData"
      border
      size="mini"
    >
      <el-table-column align="center" label="序号" type="index">
        <template slot-scope="scope">
          <span>{{ (listQuery.pageNo - 1) * listQuery.pageSize + scope.$index + 1 }}</span>
        </template>
      </el-table-column>
      <el-table-column prop="apkClass" align="center" label="apk类型" width="110" />
      <el-table-column prop="apkName" align="center" label="apk名称" width="320" :show-overflow-tooltip="true" />
      <el-table-column prop="apkVersion" align="center" label="apk版本号" width="80" :show-overflow-tooltip="true" />
      <el-table-column prop="bindState" align="center" label="设备与apk绑定状态" width="180" />
      <el-table-column prop="deviceName" align="center" label="设备名称" width="90" />
      <el-table-column prop="equipmentNo" align="center" label="设备id" width="200" />
      <el-table-column prop="finishTime" align="center" label="设备完成apk更新时间" />
      <el-table-column prop="state" align="center" label="设备状态" />
    </el-table>
    <pagination
      :total-count="totalCount"
      :page.sync="listQuery.pageNo"
      :limit.sync="listQuery.pageSize"
      @pagination="getList"
    />
  </div>
</template>
<script>
import { commonMixin } from '@v/mixin/commonMixin.js'
import ComApiUrl from '@a/comomApi.js'
import pagination from '@/components/pagination/index.vue'
// eslint-disable-next-line no-unused-vars
export default {
  // eslint-disable-next-line vue/no-unused-components
  components: { pagination },
  mixins: [commonMixin],
  data() {
    return {
      // 查询列表信息接口ok
      comApiUrlList: new ComApiUrl('/autoUpdate/api/autoUpdateDeviceBind/getApkBindDeviceList'),
      loading: false,
      // ok listquery
      listQuery: {
        pageNo: 1,
        pageSize: 10
      },
      tableData: [
        {
          apkClass: '',
          apkName: '',
          apkSize: '',
          apkVersion: '',
          build: 0,
          createTime: '',
          explanation: '',
          type: '',
          url: ''
        }
      ]
    }
  },
  mounted() {
    this.getList()
  },
  methods: {
    getList() {
      this.getInfo()
    },
    // 查询 ok
    handleSearch() {
      this.getList()
    }
  }
}
</script>

<style lang="scss" scoped>
.loadingContainer{
 position: absolute;
 left: 50%;
 top:50%;
 display: none;
 margin-left: -40px;
 margin-top:-50px;
 z-index: 999;
}
</style>
